package com.hoshiicloud.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
public enum OrderMainServiceStatusEnum {
    NO_AFTER_SALE(0,"未售后"),
    ALL_AFTER_SALE(1,"已售后"),
    PART_AFTER_SALE(2,"部分售后");



    /**
     * 状态码
     */
    @Getter
    private int code;

    /**
     * 意义
     */
    @Getter
    private String name;


    public static String getNameByCode(int code) {
        for (OrderMainServiceStatusEnum value : values()) {
            if (value.getCode() == code) {
                return value.getName();
            }
        }
        return null;
    }
}
